/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package view.jPanels;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Gean
 */
@Embeddable
public class BempatrimonialPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idBemPatrimonial")
    private int idBemPatrimonial;
    @Basic(optional = false)
    @Column(name = "Plaqueta_NumPlaqueta")
    private int plaquetaNumPlaqueta;

    public BempatrimonialPK() {
    }

    public BempatrimonialPK(int idBemPatrimonial, int plaquetaNumPlaqueta) {
        this.idBemPatrimonial = idBemPatrimonial;
        this.plaquetaNumPlaqueta = plaquetaNumPlaqueta;
    }

    public int getIdBemPatrimonial() {
        return idBemPatrimonial;
    }

    public void setIdBemPatrimonial(int idBemPatrimonial) {
        this.idBemPatrimonial = idBemPatrimonial;
    }

    public int getPlaquetaNumPlaqueta() {
        return plaquetaNumPlaqueta;
    }

    public void setPlaquetaNumPlaqueta(int plaquetaNumPlaqueta) {
        this.plaquetaNumPlaqueta = plaquetaNumPlaqueta;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idBemPatrimonial;
        hash += (int) plaquetaNumPlaqueta;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BempatrimonialPK)) {
            return false;
        }
        BempatrimonialPK other = (BempatrimonialPK) object;
        if (this.idBemPatrimonial != other.idBemPatrimonial) {
            return false;
        }
        if (this.plaquetaNumPlaqueta != other.plaquetaNumPlaqueta) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "view.jPanels.BempatrimonialPK[ idBemPatrimonial=" + idBemPatrimonial + ", plaquetaNumPlaqueta=" + plaquetaNumPlaqueta + " ]";
    }
    
}
